package demo1;


public class Test {
    public static void fun(Shape shape) {
        shape.draw();
    }
    public static void main(String[] args) {
        //Shape shape = new Shape();//抽象类不能实例化对象
        Rotundity rotundity = new Rotundity();
        Square square = new Square();

        fun(rotundity);
        fun(square);
        System.out.println("===========");

        fun(new Rotundity());
        fun(new Square());
        fun(new Triangle());
    }
}
